{extend name="layout:base" /}

{block name="content"}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
<!--                公告-->
                <div class="layui-card">
                    <div class="layui-card-header">最新公告</div>
                    <div class="layui-card-body layui-text">
                        <table class="layui-table">
                            <thead>
                            <tr>
                                <th>标题</th>
                                <th>时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                {volist name="gg" id="vo" }
                                <td><a lay-href="{:url('/admin/gg/show')}?id={$vo.id}">{$vo.name}</a></td>
                                <td>{$vo.intime}</td>
                                {/volist}
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                {if condition="$Think.session.admin.levelNum ==1 "}
                <div class="layui-card">
                    <div class="layui-card-header">我的钱包</div>
                    <div class="layui-card-body layui-text">
                        <table class="layui-table" style="text-align: center">
                            <thead>
                            <tr>
                                <th style="text-align: center">本月金额</th>
                                <th style="text-align: center">上月金额</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>{$my_month}</td>
                                <td>{$my_lastMonth}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                {/if}

<!--                总数据-->
                {if condition="$Think.session.admin.levelNum ==50 "}
                <div class="layui-card">
                    <div class="layui-card-header">数据统计</div>
                    <div class="layui-card-body layui-text">
                        <div class="layui-carousel layadmin-carousel layadmin-backlog">
                            <div carousel-item>
                                <ul class="layui-row layui-col-space10">
                                    <li class="layui-col-xs6 ">
                                        <span class="layadmin-backlog-body">
                                            <h3>充值总金额</h3>
                                            <p><cite>{$dataAll_cz}</cite></p>
                                        </span>
                                    </li>
                                    <li class="layui-col-xs6 ">
                                        <span class="layadmin-backlog-body">
                                            <h3>消费总金额</h3>
                                            <p><cite>{$dataAll_xf}</cite></p>
                                        </span>
                                    </li>
                                    <li class="layui-col-xs6 ">
                                        <span class="layadmin-backlog-body">
                                            <h3>客户总数</h3>
                                            <p><cite>{$dataUser}</cite></p>
                                        </span>
                                    </li>
                                    <li class="layui-col-xs6 ">
                                        <span class="layadmin-backlog-body">
                                            <h3>网址总数</h3>
                                            <p><cite>{$dataWeb}</cite></p>
                                        </span>
                                    </li>
                                </ul>
                                <ul class="layui-row layui-col-space10">
                                    <li class="layui-col-xs4 ">
                                        <span class="layadmin-backlog-body">
                                            <h3>关键词总数</h3>
                                            <p><cite>{$dataWebkey}</cite></p>
                                        </span>
                                    </li>
                                    <li class="layui-col-xs3 ">
                                        <span class="layadmin-backlog-body">
                                            <h3>扣费金额（当前）</h3>
                                            <p><cite>{$dataWebkey_kf}</cite></p>
                                        </span>
                                    </li>
                                    <li class="layui-col-xs4 ">
                                        <span class="layadmin-backlog-body">
                                            <h3>当前月份销售总额</h3>
                                            <p><cite>{$dataMonth_kf}</cite></p>
                                        </span>
                                    </li>

                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                {/if}
<!--                扣费数据-->
                {if condition="$Think.session.admin.levelNum >1 "}
                <div class="layui-card">
                    <div class="layui-card-header">扣费数据</div>
                    <div class="layui-card-body layui-text">
                        <table class="layui-table">
                            <thead>
                            <tr>
                                <th>总计</th>
                                <th>昨日</th>
                                <th>本周</th>
                                <th>本月</th>
                                <th>上月</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>{$kf_all}</td>
                                <td>{$kf_yesterday}</td>
                                <td>{$kf_week}</td>
                                <td>{$kf_month}</td>
                                <td>{$kf_lastMonth}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                {/if}

                <div class="layui-card">
                    <div class="layui-card-header">优化排行榜</div>
                    <div class="layui-card-body layui-text">
                        <table class="layui-table">
                            <thead>
                            <tr>
                                <th>日排名</th>
                                <th>优化师</th>
                                <th>百度达标率</th>
                                <th>网站达标率</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="list" id="vo" key="k" }
                            <tr>
                                <td>{$k}</td>
                                <td>{$vo.name}</td>
                                <td>{$vo.data_key}%</td>
                                <td>{$vo.data_web}%</td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                    </div>
                </div>

                {if condition="$Think.session.admin.levelNum ==1 "}
                <div class="layui-card">
                    <div class="layui-card-header">个人扣费数据</div>
                    <div class="layui-card-body layui-text">
                        <table class="layui-table">
                            <thead>
                            <tr>
                                <th>总计</th>
                                <th>昨日</th>
                                <th>本周</th>
                                <th>本月</th>
                                <th>上月</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>{$my_all}</td>
                                <td>{$my_yesterday}</td>
                                <td>{$my_week}</td>
                                <td>{$my_month}</td>
                                <td>{$my_lastMonth}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                {/if}

                <div class="layui-card">
                    <div class="layui-card-header">版本信息</div>
                    <div class="layui-card-body layui-text">
                        <table class="layui-table">

                            <tbody>
                            <tr>
                                <td>当前版本</td>
                                <td>
                                    <script type="text/html" template>Version 1.0.0</script>
                                </td>
                            </tr>
                            <tr>
                                <td>基于框架</td>
                                <td>
                                    <script type="text/html" template>layui-v{{ layui.v }}</script>
                                    + thinkPhp 5.0.24
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script>
    layui.config({
        base: '__STATIC__/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'console']);
</script>
{/block}





